package spring;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//容器使用注解方式创建对象有4种形式：@Controller,@Service,@Mapper,@Repository,@Component(构建)
@Component
@Data
public class Car {
//    @Value("LCY")
    String name;
//    @Value("Xiaomi")
    String type;
//    @Value("30000")
    int maxSpeed;
    public Car(){
    }
    public Car(String name, String type, int maxSpeed) {
        this.name = name;
        this.type = type;
        this.maxSpeed = maxSpeed;
    }
}
